package com.qian.ddj.utils;

import org.springframework.beans.factory.BeanFactory;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletRequest;

public class WebApplicationContextUtils {
    private <T> T getDao(Class<T> clazz, HttpServletRequest request){
        BeanFactory factory = org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(request.getServletContext());



        return factory.getBean(clazz);
    }
}
